using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using System.Collections;
using System.Data.SqlClient;


public class DBCarga : DALBase
{

    public static void insertaErrorCarga(Int64 id, string error, string tableName)
    {

        using (SqlConnection conn = new SqlConnection(prCadConexion))
        {
            using (SqlCommand cmd = new SqlCommand("USPC_INSERTA_ERROR_CARGA", conn))
            {
                conn.Open();
                cmd.CommandTimeout = 0;
                cmd.CommandType = CommandType.StoredProcedure;

                cmd.Parameters.Add(new SqlParameter("@ID", id));
                cmd.Parameters.Add(new SqlParameter("@ERR_ESTRUCTURA", fnVerNuloStr(error)));
                cmd.Parameters.Add(new SqlParameter("@TABLE_NAME", fnVerNuloStr(tableName)));

                cmd.ExecuteNonQuery();

            }
        }

    }

    public static void limpiaTemporalesCarga()
    {

        using (SqlConnection conn = new SqlConnection(prCadConexion))
        {
            using (SqlCommand cmd = new SqlCommand("USPC_LIMPIA_TEMPORALES", conn))
            {
                conn.Open();
                cmd.CommandTimeout = 0;
                cmd.CommandType = CommandType.StoredProcedure;

                cmd.ExecuteNonQuery();

            }
        }

    }



}